package BehaviorDesignPattern.MediatorPattern;

// 抽象组件类，所有组件都通过中介者进行通信
abstract class Component {
    protected Mediator mediator;

    public Component(Mediator mediator) {
        this.mediator = mediator;
    }

    public void setMediator(Mediator mediator) {
        this.mediator = mediator;
    }
}
